/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.hk.shop.entity.order;

import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.thinkgem.jeesite.modules.hk.sys.entity.user.HkUser;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 乐购用户子订单Entity
 * @author 罗天文
 * @version 2018-07-09
 */
public class HkShopUserSubOrder extends DataEntity<HkShopUserSubOrder> {
	
	private static final long serialVersionUID = 1L;
	private String ordernumber;		// 订单号
	private String subordernumber;		// 子订单号
	private String integral;		// 乐币
	private String state;		// 订单状态
	private Date limittime;		// 限制时间
	private Date paytime;		// 支付时间
	private HkUser user;		// 用户id
	
	public HkShopUserSubOrder() {
		super();
	}

	public HkShopUserSubOrder(String id){
		super(id);
	}

	@Length(min=0, max=20, message="订单号长度必须介于 0 和 20 之间")
	public String getOrdernumber() {
		return ordernumber;
	}

	public void setOrdernumber(String ordernumber) {
		this.ordernumber = ordernumber;
	}
	
	@Length(min=0, max=20, message="子订单号长度必须介于 0 和 20 之间")
	public String getSubordernumber() {
		return subordernumber;
	}

	public void setSubordernumber(String subordernumber) {
		this.subordernumber = subordernumber;
	}
	
	@Length(min=0, max=11, message="乐币长度必须介于 0 和 11 之间")
	public String getIntegral() {
		return integral;
	}

	public void setIntegral(String integral) {
		this.integral = integral;
	}
	
	@Length(min=0, max=2, message="订单状态长度必须介于 0 和 2 之间")
	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getLimittime() {
		return limittime;
	}

	public void setLimittime(Date limittime) {
		this.limittime = limittime;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getPaytime() {
		return paytime;
	}

	public void setPaytime(Date paytime) {
		this.paytime = paytime;
	}
	
	public HkUser getUser() {
		return user;
	}

	public void setUser(HkUser user) {
		this.user = user;
	}
	
}